using UnityEngine;
using System.Collections;

public class Monster_Knockback_State : State {
	Vector3 KnockbackDirection;
	private float KnockbackForce;
	public override void Enter_State(Alive_object _monster_script)
	{
		KnockbackForce = GameManager.getInstance().All_game_data.KnockbackForce;
		KnockbackDirection = GameManager.getInstance().Player_script.transform.forward;
		print( KnockbackDirection);
		KnockbackDirection.Normalize();
	}
	public override void Excute_State(Alive_object _monster_script)
	{
		transform.position += KnockbackDirection * KnockbackForce * Time.deltaTime;
		if(KnockbackForce <= 0.5f )
		{
			_monster_script.fsm.Change_state(_monster_script.arr_state_[0],_monster_script);
		}
		else
		{
			KnockbackForce =KnockbackForce - (1.5f * Time.deltaTime);
		}
	}
	public override void Exit_State(Alive_object _monster_script)
	{
	}
}
